<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>http::response_parser</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Beast">
<link rel="up" href="../ref.html" title="This Page Intentionally Left Blank 2/2">
<link rel="prev" href="boost__beast__http__request_parser.html" title="http::request_parser">
<link rel="next" href="boost__beast__http__request_header.html" title="http::request_header">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
<td align="center"><a href="../../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__http__request_parser.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__request_header.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="beast.ref.boost__beast__http__response_parser"></a><a class="link" href="boost__beast__http__response_parser.html" title="http::response_parser">http::response_parser</a>
</h4></div></div></div>
<p>
        <a class="indexterm" name="idm44861247538080"></a>
      </p>
<p>
        An HTTP/1 parser for producing a response message.
      </p>
<h5>
<a name="beast.ref.boost__beast__http__response_parser.h0"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__response_parser.synopsis"></a></span><a class="link" href="boost__beast__http__response_parser.html#beast.ref.boost__beast__http__response_parser.synopsis">Synopsis</a>
      </h5>
<p>
        Defined in header <code class="literal">&lt;<a href="../../../../../../boost/beast/http/parser.hpp" target="_top">boost/beast/http/parser.hpp</a>&gt;</code>
      </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
    <span class="keyword">class</span> <a class="link" href="../concepts/Body.html" title="Body"><span class="emphasis"><em>Body</em></span></a><span class="special">,</span>
    <span class="keyword">class</span> <a href="https://en.cppreference.com/w/cpp/named_req/Allocator" target="_top"><span class="emphasis"><em>Allocator</em></span></a> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">allocator</span><span class="special">&lt;</span><span class="keyword">char</span><span class="special">&gt;&gt;</span>
<span class="keyword">using</span> <span class="identifier">response_parser</span> <span class="special">=</span> <span class="identifier">parser</span><span class="special">&lt;</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">Body</span><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;;</span>
</pre>
<h5>
<a name="beast.ref.boost__beast__http__response_parser.h1"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__response_parser.types"></a></span><a class="link" href="boost__beast__http__response_parser.html#beast.ref.boost__beast__http__response_parser.types">Types</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/is_request.html" title="http::parser::is_request">is_request</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  <code class="computeroutput"><span class="keyword">true</span></code> if this parser
                  parses requests, <code class="computeroutput"><span class="keyword">false</span></code>
                  for responses.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/value_type.html" title="http::parser::value_type">value_type</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  The type of message returned by the parser.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__http__response_parser.h2"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__response_parser.member_functions"></a></span><a class="link" href="boost__beast__http__response_parser.html#beast.ref.boost__beast__http__response_parser.member_functions">Member
        Functions</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Name
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/body_limit.html" title="http::parser::body_limit">body_limit</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Set the limit on the payload body.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/chunked.html" title="http::parser::chunked">chunked</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns <code class="computeroutput"><span class="keyword">true</span></code> if the
                  last value for Transfer-Encoding is "chunked".
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/content_length.html" title="http::parser::content_length">content_length</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns the optional value of Content-Length if known.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/content_length_remaining.html" title="http::parser::content_length_remaining">content_length_remaining</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns the remaining content length if known.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/eager.html" title="http::parser::eager">eager</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns <code class="computeroutput"><span class="keyword">true</span></code> if the
                  eager parse option is set. <br> <span class="silver">—</span><br>
                  Set the eager parse option.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/get.html" title="http::parser::get">get</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns the parsed message.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/got_some.html" title="http::parser::got_some">got_some</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns <code class="computeroutput"><span class="keyword">true</span></code> if the
                  parser has received at least one byte of input.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/header_limit.html" title="http::parser::header_limit">header_limit</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Set a limit on the total size of the header.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/is_done.html" title="http::parser::is_done">is_done</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns <code class="computeroutput"><span class="keyword">true</span></code> if the
                  message is complete.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/is_header_done.html" title="http::parser::is_header_done">is_header_done</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns <code class="computeroutput"><span class="keyword">true</span></code> if a
                  the parser has produced the full header.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/keep_alive.html" title="http::parser::keep_alive">keep_alive</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns <code class="computeroutput"><span class="keyword">true</span></code> if the
                  message has keep-alive connection semantics.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/need_eof.html" title="http::parser::need_eof">need_eof</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns <code class="computeroutput"><span class="keyword">true</span></code> if the
                  message semantics require an end of file.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/on_chunk_body.html" title="http::parser::on_chunk_body">on_chunk_body</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Set a callback to be invoked on chunk body data.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/on_chunk_header.html" title="http::parser::on_chunk_header">on_chunk_header</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Set a callback to be invoked on each chunk header.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/operator_eq_.html" title="http::parser::operator=">operator=</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Assignment (disallowed)
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/parser.html" title="http::parser::parser">parser</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Constructor (disallowed) <br> <span class="silver">—</span><br>
                  Constructor. <br> <span class="silver">—</span><br> Construct
                  a parser from another parser, changing the Body type.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/put.html" title="http::parser::put">put</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Write a buffer sequence to the parser.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/put_eof.html" title="http::parser::put_eof">put_eof</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Inform the parser that the end of stream was reached.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/release.html" title="http::parser::release">release</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns ownership of the parsed message.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/skip.html" title="http::parser::skip">skip</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns <code class="computeroutput"><span class="keyword">true</span></code> if the
                  skip parse option is set. <br> <span class="silver">—</span><br>
                  Set the skip parse option.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/upgrade.html" title="http::parser::upgrade">upgrade</a></strong></span>
                </p>
              </td>
<td>
                <p>
                  Returns <code class="computeroutput"><span class="keyword">true</span></code> if the
                  message is an upgrade message.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <span class="bold"><strong><a class="link" href="boost__beast__http__parser/_parser.html" title="http::parser::~parser">~parser</a> <span class="silver">[destructor]</span></strong></span>
                </p>
              </td>
<td>
                <p>
                  Destructor.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<p>
        This class uses the basic HTTP/1 wire format parser to convert a series of
        octets into a <a class="link" href="boost__beast__http__message.html" title="http::message"><code class="computeroutput"><span class="identifier">message</span></code></a> using the <a class="link" href="boost__beast__http__basic_fields.html" title="http::basic_fields"><code class="computeroutput"><span class="identifier">basic_fields</span></code></a> container to represent
        the fields.
      </p>
<h5>
<a name="beast.ref.boost__beast__http__response_parser.h3"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__response_parser.template_parameters"></a></span><a class="link" href="boost__beast__http__response_parser.html#beast.ref.boost__beast__http__response_parser.template_parameters">Template
        Parameters</a>
      </h5>
<div class="informaltable"><table class="table">
<colgroup>
<col>
<col>
</colgroup>
<thead><tr>
<th>
                <p>
                  Type
                </p>
              </th>
<th>
                <p>
                  Description
                </p>
              </th>
</tr></thead>
<tbody>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">isRequest</span></code>
                </p>
              </td>
<td>
                <p>
                  Indicates whether a request or response will be parsed.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">Body</span></code>
                </p>
              </td>
<td>
                <p>
                  The type used to represent the body. This must meet the requirements
                  of <span class="emphasis"><em>Body</em></span>.
                </p>
              </td>
</tr>
<tr>
<td>
                <p>
                  <code class="computeroutput"><span class="identifier">Allocator</span></code>
                </p>
              </td>
<td>
                <p>
                  The type of allocator used with the <a class="link" href="boost__beast__http__basic_fields.html" title="http::basic_fields"><code class="computeroutput"><span class="identifier">basic_fields</span></code></a> container.
                </p>
              </td>
</tr>
</tbody>
</table></div>
<h5>
<a name="beast.ref.boost__beast__http__response_parser.h4"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__response_parser.remarks"></a></span><a class="link" href="boost__beast__http__response_parser.html#beast.ref.boost__beast__http__response_parser.remarks">Remarks</a>
      </h5>
<p>
        A new instance of the parser is required for each message.
      </p>
<h5>
<a name="beast.ref.boost__beast__http__response_parser.h5"></a>
        <span class="phrase"><a name="beast.ref.boost__beast__http__response_parser.description"></a></span><a class="link" href="boost__beast__http__response_parser.html#beast.ref.boost__beast__http__response_parser.description">Description</a>
      </h5>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie
      Falco<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="boost__beast__http__request_parser.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="boost__beast__http__request_header.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
